using System;

namespace CodePlex.CodePlexClientLibrary
{
    [Command("mapuser", "Maps CodePlex username to TFS username", MinArgs = 1, MaxArgs = 1, UsageSummary = "<username>")]
    public class MapUserCommand : NonAuthenticatedCommand
    {
        readonly ICodePlexProjectInfoService projectInfoService;

        public MapUserCommand(ICodePlexProjectInfoService projectInfoService)
        {
            this.projectInfoService = projectInfoService;
        }

        public override void Execute()
        {
            Console.WriteLine(projectInfoService.CodePlexUsernameToTfsUsername(Arguments[0]));
        }
    }
}